<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/iconfont.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-slide.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/user_infoNotes.css" />
<link rel="stylesheet"
	href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript" src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-dialog.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-toast.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/auipopupstyle.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-slide.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/base.js?version=3.4"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/recycle/user_infoNotes.js"></script>
<script type="text/javascript" src="<%=URL%>js/doT.min.js"></script>
<title>我的记录</title>
<style type="text/css">
.body-right span{
width: 2.4rem;
text-align: center;
}
</style>
</head>

<body>
	<header class="aui-bar aui-bar-nav"><%--  <a
		class="aui-pull-left aui-btn" href="<%=URL%>weixinuser/newhtml/user_infoList.jsp"> <span
		class="aui-iconfont aui-icon-left"></span>
	</a> --%>
	<div class="aui-title">我的记录</div>
	<a class="aui-pull-right aui-btn"> <span
		class="aui-iconfont aui-icon-more"></span>
	</a> </header>
	<div class="body-box aui-refresh-content">
		<div class="notesList-box aui-content-padded">
			<div id="dotmainhtml"></div>
		<script type="template" id="dotTmpl">
			{{if(it.length!=0){ }}
				 {{ for(var i=0;i<it.length;i++){	}}	
				 {{if(it[i].orgstatus=="2"){}}
					<div class="notesList aui-margin-b-15"
				onclick="$(location).attr('href', 'user_infoNotesDetails.jsp?orderid={{=it[i].orderid}}')">
				<div class="notesList-header aui-padded-15 bging">
					<div class="header-left">
						<i class="aui-iconfont aui-icon-date"></i>
					</div>
					<div class="header-center">
						<span>发布时间</span> <span>{{=it[i].createdDt}}</span>
					</div>
					<div class="header-right">
						<span class="bging">确认中</span>
					</div>
				</div>
				<div class="notesList-bodyBox">
					<hr />
					<div class="notesList-body">
						<div class="body-left">
							<div>地址: {{=it[i].address}}</div>
							<div>状态: 该订单已确认，收油车派送中...</div>
						</div>
						<div class="body-right">
							<span class="bging">{{=it[i].num}}/桶</span>
						</div>
					</div>
				</div>
			</div>
			{{}}}
 {{ if(it[i].orgstatus=="1"){ }}
					<div class="notesList aui-margin-b-15"
				onclick="$(location).attr('href', 'user_infoNotesDetails.jsp?orderid={{=it[i].orderid}}');">
				<div class="notesList-header aui-padded-15 bging">
					<div class="header-left">
						<i class="aui-iconfont aui-icon-date"></i>
					</div>
					<div class="header-center">
						<span>发布时间</span> <span>{{=it[i].createdDt}}</span>
					</div>
					<div class="header-right">
						<span class="bging">确认中</span>
					</div>
				</div>
				<div class="notesList-bodyBox">
					<hr />
					<div class="notesList-body">
						<div class="body-left">
							<div>地址: {{=it[i].address}}</div>
							<div>状态: 该订单尚未确认，请稍候...</div>
						</div>
						<div class="body-right">
							<span class="bging">{{=it[i].num}}/桶</span>
						</div>
					</div>
				</div>
			</div>
			{{ }}}
			{{ if(it[i].orgstatus=="3"){}}
<div class="notesList aui-margin-b-15"
				onclick="$(location).attr('href', 'user_infoNotesDetails.jsp?orderid={{=it[i].orderid}}');">
				<div class="notesList-header aui-padded-15 bging1">
					<div class="header-left">
						<i class="aui-iconfont aui-icon-date"></i>
					</div>
					<div class="header-center">
						<span>发布时间</span> <span>{{=it[i].createdDt}}</span>
					</div>
					<div class="header-right">
						<span class="bging1">派送中</span>
					</div>
				</div>
				<div class="notesList-bodyBox">
					<hr />
					<div class="notesList-body">
						<div class="body-left">
							<div>地址: {{=it[i].address}}</div>
							<div>状态: 收油车已在派送途中</div>
						</div>
						<div class="body-right">
							<span class="bging1">{{=it[i].num}}/桶</span>
						</div>
					</div>
				</div>
			</div>
			{{}}}
			{{ if(it[i].orgstatus=="4"){}}
			<div class="notesList aui-margin-b-15" onclick="$(location).attr('href', 'user_infoNotesDetails.jsp?orderid={{=it[i].orderid}}');">
				<div class="notesList-header aui-padded-15 bgend">
					<div class="header-left">
						<i class="aui-iconfont aui-icon-date"></i>
					</div>
					<div class="header-center">
						<span>发布时间</span> <span>{{=it[i].createdDt}}</span>
					</div>
					<div class="header-right">
						<span class="bgend">已结束</span> 
						{{if(it[i].iscomment||it[i].iscomment=="undefined"){}}
							<i class="bgend2">服务评价</i>
						{{}}}
						{{else{}}
							<i class="bgend1"><a href="user_Comment.jsp?phone={{=it[i].phone}}&orderId={{=it[i].orderid}}" style="color: #FFFFFF;">服务评价</a></i>
						{{}}}
						
					</div>
				</div>
				<div class="notesList-bodyBox">
					<hr />
					<div class="notesList-body">
						<div class="body-left">
							<div>地址: {{=it[i].address}}</div>
							<div>状态: 订单已结束</div>
						</div>
						<div class="body-right">
							<span class="bgend">{{=it[i].num}}/桶</span>
						</div>
					</div>
				</div>
			</div>
			{{}}}
		
				 {{}}}
			{{ }}}
		</script>
		</div>
	</div>
</body>
<script>
		dorefresh();
	</script>
<script type="text/javascript">
$(function(){
	findlist(getCookie("useriphone"),"",10)
})
	function findlist(phone,orderid,roleId){
		showDefault("loading","加载中...");
	var json = {
			"filterscount": "0",
			"groupscount": "0",
			"pagenum": "0",//页数
			"pagesize": "0",//条数
			"recordstartindex": "0",
			"recordendindex": "0",
			"roleId": "10",//角色id
			"phone": "18883753989",
			"iphone": "18883753989"
	}
	var jsonstr = "filterscount=0&groupscount=0&pagenum=0&pagesize=1000&recordstartindex=0&recordendindex=1000&roleId="+roleId+"&phone="+phone+"&iphone="+phone+"&orderid="+orderid+"";
	$.ajax({
		cache: false,
		type: "post",
		datatype: 'json',
		contentType: 'application/json;charset=UTF-8',
		data: jsonstr,
		url: ''+httpipstr+'alfa-mobile-ws/rest/order/findlist?mobiletoken='+getCookie("mobiletokenuser")+'',
		success: function(data) {
		toast.hide();
		var tmpl = doT.template($("#dotTmpl").html());
		// 将数据扔进templ中。并在DIV中显示出来
		$("#dotmainhtml").html(tmpl(data.rows));
	}
	})
}
		
	</script>

</html>